﻿@model RentalSystem.Data.EF.MovieKinds

@{
    ViewBag.Title = "MoviesCategoryEdit";
    Layout = "~/Views/Shared/WorkerLayout.cshtml";
}

@if (ViewBag.FormMode == Web.Helper.Mode.Edit)
{
    <h2>Edycja kategorii</h2>
    
    using (Html.BeginForm())
    {    
        <div class="form" style="width: 600px">

            @Html.HiddenFor(mk => mk.MovieKindID)
            
            <div class="formtitle">Edycja kategorii filmów:</div>
            
            <div class="input">
			    <div class="inputtext">Nazwa:</div>
			    <div class="inputcontent">
				    @Html.TextBoxFor(mk => mk.MovieKindName)
                    <div class="inputcontenterror">
                        @Html.ValidationMessageFor(model => model.MovieKindName)
                    </div>
			    </div>
		    </div>

            <div class="input">
			    <div class="inputtext">Skrót:</div>
			    <div class="inputcontent">
				    @Html.TextBoxFor(mk => mk.MovieKindShortcut)
                    <div class="inputcontenterror">
                        @Html.ValidationMessageFor(model => model.MovieKindShortcut)
                    </div>
			    </div>
		    </div>

		    <div class="input">
			    <div class="inputtext">Dodatkowy opis:</div>
			    <div class="inputcontent">
				    @Html.TextAreaFor(mk => mk.MovieKindDescription)
			    </div>
		    </div>
            
            <div class="buttons">
				<input class="orangebutton" type="submit" value="Zapisz zmiany" />
			</div>
    </div>
    }
}
else
{
    using (Html.BeginForm("MoviesCategoryAdd", "Workers"))
    {            
    <div class="form" style="width: 600px">

            <div class="formtitle">Nowa kategoria filmów:</div>
            
            <div class="input">
			    <div class="inputtext">Nazwa:</div>
			    <div class="inputcontent">
				    @Html.TextBoxFor(mk => mk.MovieKindName)
                    <div class="inputcontenterror">
                        @Html.ValidationMessageFor(model => model.MovieKindName)
                    </div>
			    </div>
		    </div>

            <div class="input">
			    <div class="inputtext">Skrót:</div>
			    <div class="inputcontent">
				    @Html.TextBoxFor(mk => mk.MovieKindShortcut)
                    <div class="inputcontenterror">
                        @Html.ValidationMessageFor(model => model.MovieKindShortcut)
                    </div>
			    </div>
		    </div>

		    <div class="input">
			    <div class="inputtext">Dodatkowy opis:</div>
			    <div class="inputcontent">
				    @Html.TextAreaFor(mk => mk.MovieKindDescription, new {@class="textarea"})
			    </div>
		    </div>
            
            <div class="buttons">
				<input class="orangebutton" type="submit" value="Dodaj kategorię" />
				<input class="greybutton" type="reset" value="Wyczyść" />
			</div>
    </div>
    }
}

